import request from '@/utils/request';

/** 获取坐标 */
export const getCoordinatesApi = (address, output, key) => {
    return request({
      url: 'geo',
      method: 'get',
      params: {
        address: address,
        output: output|| null,
        key: key
      }
    });
  };

  /** 获取区和镇 */
export const getTownApi = (output, location, key, radius, extensions) => {
    return request({
      url: 'regeo',
      method: 'get',
      params: {
        output: output|| null,
        location: location,
        key: key|| null,
        radius: radius|| null,
        extensions: extensions|| null
      }
    });
  };